package com.senlingspace.payment.douyin.service.impl;

import com.senlingspace.common.utils.StringUtils;
import com.senlingspace.payment.douyin.DouyinHttpClient;
import com.senlingspace.payment.douyin.bean.request.DouyinShopQueryRequest;
import com.senlingspace.payment.douyin.bean.response.DouyinShopQueryResponse;
import com.senlingspace.payment.douyin.service.DouYinShopService;
import org.springframework.stereotype.Service;

@Service
public class DouYinShopServiceImpl implements DouYinShopService {


    @Override
    public DouyinShopQueryResponse prepare(DouyinShopQueryRequest request) {

        if (StringUtils.isBlank(request.getAccountId()) && StringUtils.isBlank(request.getPoiId())) {
            request.setAccountId("7421093720344233996");
        }

        DouyinShopQueryResponse invoke = DouyinHttpClient.invoke(request);

        return invoke;
    }
}
